package com.liu.domain;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * Created by liu on 17-10-15.
 */
@Entity
public class rule {
    @Id
    private int id;        //违规编号
    private String ty;        //违规类型
    private int R_id;       //房间编号
    private String descript;    //违规描述
    @Temporal(TemporalType.DATE)
    private Date date = new Date();   //违规日期

    private String roomId;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTy() {
        return ty;
    }

    public void setTy(String ty) {
        this.ty = ty;
    }

    public int getR_id() {
        return R_id;
    }

    public void setR_id(int r_id) {
        R_id = r_id;
    }

    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    @Override
    public String toString() {
        return "{" +
                "\"id\":" + id +
                ", \"R_id\":" + R_id +
                ", \"ty\":\"" + ty + '\"' +
                ", \"descript\":\"" + descript + '\"' +
                ", \"date\":\"" + date + '\"' +
                ", \"roomId\":\"" + roomId + '\"' +
                '}';
    }
}
